﻿using System;
using System.IO;

namespace FileTransformer
{
    public class FileUtils
    {
        public static string GetFileDirectoryPath(string path)
        {
            return ((!String.IsNullOrEmpty(path) && (path[path.Length - 1] != '\\')) ? (path + '\\') : path);
        }

        public static string GetDirectoryName(string path)
        {
            return Path.GetDirectoryName(path);
        }

        public static string GetFileName(string path)
        {
            return Path.GetFileName(path);
        }

        public static string GetExtension(string path)
        {
            return Path.GetExtension(path);
        }

        public static void CreateDirectory(string path)
        {
            Directory.CreateDirectory(path);
        }
    }
}
